package cn.edu.zut.salarymanagesystem.bean.pojo;

import java.util.Date;


public class WorkRecord implements Comparable<Object> {
    private String owner = null;
    private String objectName = null;
    private Date time = null;
    private Integer number = 1;
    private Integer value = 1;
    private Integer valid = 1;
    private String uid = null;
    private String commentary = null;

    public WorkRecord(String owner, Date time, String objectName, Integer number, Integer value, Integer valid, String commentary) {

    }

    public WorkRecord() {

    }

    public String getCommentary() {
        return commentary;
    }

    public void setCommentary(String commentary) {
        this.commentary = commentary;
    }

    public Integer getValue() {
        return value;
    }

    public Date getTime() {
        return time;
    }

    @Override
    public int compareTo(Object o) {
        WorkRecord wr = (WorkRecord) o;
        return getTime().compareTo(wr.getTime()) * (-1);
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getObjectName() {
        return objectName;
    }

    public void setObjectName(String objectName) {
        this.objectName = objectName;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public Integer getValid() {
        return valid;
    }

    public void setValid(Integer valid) {
        this.valid = valid;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    @Override
    public String toString() {
        return "WorkRecord{" +
                "owner='" + owner + '\'' +
                ", objectName='" + objectName + '\'' +
                ", time=" + time +
                ", number=" + number +
                ", value=" + value +
                ", valid=" + valid +
                ", uid=" + uid +
                ", commentary='" + commentary + '\'' +
                '}';
    }
}
